package com.repeat.member.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.shop.servlet.utils.UserSecurity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("member")
public class IndexController {
    @GetMapping("index")
    public String index() {

        return "index111111"+ UserSecurity.getUserId();
    }

    @GetMapping("query")
    public String query() {
        return "查询用户";
    }
    @GetMapping("add")
    @SentinelResource("sentinelAdd")
    public String add() {
        return "添加用户";
    }
}
